#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>

char * _strcpy(char *va, const char *vb)
{
 /*80485d0:	55                   	push   %ebp
 80485d1:	89 e5                	mov    %esp,%ebp
 80485d3:	83 ec 28             	sub    $0x28,%esp
 80485d6:	83 7d 08 00          	cmpl   $0x0,0x8(%ebp)	// 0?=va
 80485da:	74 06                	je     80485e2 <_strcpy+0x12> // if equal (ZF=1).

 80485dc:	83 7d 0c 00          	cmpl   $0x0,0xc(%ebp)	// 0?=vb
 80485e0:	75 24                	jne    8048606 <_strcpy+0x36>*/ // if not equal (ZF=0).
	assert( (va != NULL) && (vb != NULL));

 /*80485e2:	c7 44 24 0c 5d 88 04 	movl   $0x804885d,0xc(%esp)
 80485e9:	08 
 80485ea:	c7 44 24 08 08 00 00 	movl   $0x8,0x8(%esp)
 80485f1:	00 
 80485f2:	c7 44 24 04 d4 87 04 	movl   $0x80487d4,0x4(%esp)
 80485f9:	08 
 80485fa:	c7 04 24 dc 87 04 08 	movl   $0x80487dc,(%esp)
 8048601:	e8 aa fe ff ff       	call   80484b0 <__assert_fail@plt>
	__assert_fail(0x80487dc, 0x80487d4, 8, 0x804885d);

 8048606:	8b 45 08             	mov    0x8(%ebp),%eax	// va
 8048609:	89 45 f4             	mov    %eax,-0xc(%ebp)*/
	char *a = va;

 /*804860c:	90                   	nop
 804860d:	8b 45 08             	mov    0x8(%ebp),%eax	// eax=va
 8048610:	8d 50 01             	lea    0x1(%eax),%edx	// edx=va+1
 8048613:	89 55 08             	mov    %edx,0x8(%ebp)	// va=edx

 8048616:	8b 55 0c             	mov    0xc(%ebp),%edx	// edx=vb
 8048619:	8d 4a 01             	lea    0x1(%edx),%ecx	// ecx=vb+1
 804861c:	89 4d 0c             	mov    %ecx,0xc(%ebp)	// vb=ecx

 804861f:	0f b6 12             	movzbl (%edx),%edx		// edx=*vb
 8048622:	88 10                	mov    %dl,(%eax)		// *va=*vb
 8048624:	0f b6 00             	movzbl (%eax),%eax		// eax=*va
 8048627:	84 c0                	test   %al,%al			// set SF, ZF, PF
 8048629:	75 e2                	jne    804860d <_strcpy+0x3d>*/
	while ( (*va++ = *vb++) != '\0');

 /*804862b:	8b 45 f4             	mov    -0xc(%ebp),%eax
 804862e:	c9                   	leave  
 804862f:	c3                   	ret    */
	return a;
}

int main()
{
 /*8048630:	55                   	push   %ebp
 8048631:	89 e5                	mov    %esp,%ebp
 8048633:	53                   	push   %ebx
 8048634:	83 e4 f0             	and    $0xfffffff0,%esp
 8048637:	83 ec 40             	sub    $0x40,%esp
 804863a:	c7 44 24 2f 61 73 64 	movl   $0x66647361,0x2f(%esp) //"asdfB"->2f 30 31 32 33
 8048641:	66 
 8048642:	c6 44 24 33 00       	movb   $0x0,0x33(%esp)*/	// 0xbffff10f:"asdf" 
	char a[5] = "asdf";

 /*8048647:	c7 44 24 3c 0a 88 04 	movl   $0x804880a,0x3c(%esp)	// 0x804880a:"name"
 804864e:	08*/ 
	char *p1="name";

 /*804864f:	c7 04 24 14 00 00 00 	movl   $0x14,(%esp)
 8048656:	e8 f5 fd ff ff       	call   8048450 <malloc@plt>	
 804865b:	89 44 24 34          	mov    %eax,0x34(%esp)*/
	char *p2 = malloc(20);

 /*804865f:	c7 44 24 08 14 00 00 	movl   $0x14,0x8(%esp)	// 20
 8048666:	00 
 8048667:	c7 44 24 04 00 00 00 	movl   $0x0,0x4(%esp)	// 0
 804866e:	00 
 804866f:	8b 44 24 34          	mov    0x34(%esp),%eax	// p2
 8048673:	89 04 24             	mov    %eax,(%esp)
 8048676:	e8 25 fe ff ff       	call   80484a0 <memset@plt>*/
	memset(p2, 0, 20);

 /*804867b:	c7 44 24 34 10 88 04 	movl   $0x8048810,0x34(%esp)
   // 0x8048810:	"xiaozhixiaozhixiaozhixiaozhixiaozhixiaozhi"
 8048682:	08 */
	p2 = "xiaozhixiaozhixiaozhixiaozhixiaozhixiaozhi";

 /*8048683:	8d 44 24 2f          	lea    0x2f(%esp),%eax	// a
 8048687:	89 04 24             	mov    %eax,(%esp)
 804868a:	e8 f1 fd ff ff       	call   8048480 <strlen@plt>	// strlen(a)
 804868f:	89 c3                	mov    %eax,%ebx	// ebx=strlen(a)
 8048691:	8b 44 24 3c          	mov    0x3c(%esp),%eax	// eax=p1
 8048695:	89 04 24             	mov    %eax,(%esp)
 8048698:	e8 e3 fd ff ff       	call   8048480 <strlen@plt>	// strlen(p1)
 804869d:	c7 44 24 14 05 00 00 	movl   $0x5,0x14(%esp)	// (esp+0x14)=5
 80486a4:	00 
 80486a5:	89 5c 24 10          	mov    %ebx,0x10(%esp)	// (esp+0x10)=strlen(a)
 80486a9:	c7 44 24 0c 04 00 00 	movl   $0x4,0xc(%esp)	// (esp+0xc)=4
 80486b0:	00 
 80486b1:	89 44 24 08          	mov    %eax,0x8(%esp)	// (esp+0x8)=strlen(p1)
 80486b5:	8b 44 24 3c          	mov    0x3c(%esp),%eax	// eax=p1
 80486b9:	89 44 24 04          	mov    %eax,0x4(%esp)	// (esp+4)=p1
 80486bd:	c7 04 24 3b 88 04 08 	movl   $0x804883b,(%esp)
 80486c4:	e8 77 fd ff ff       	call   8048440 <printf@plt>*/
	printf("%s %d %d %d %d\n", p1, strlen(p1), 4, strlen(a), 5);

 /*80486c9:	8b 44 24 34          	mov    0x34(%esp),%eax	// p2
 80486cd:	89 04 24             	mov    %eax,(%esp)
 80486d0:	e8 ab fd ff ff       	call   8048480 <strlen@plt>	// strlen(p2)
 80486d5:	c7 44 24 0c 04 00 00 	movl   $0x4,0xc(%esp)	// (esp+0xc)=4
 80486dc:	00 
 80486dd:	89 44 24 08          	mov    %eax,0x8(%esp)	// (esp+0x8)=strlen(p2)
 80486e1:	8b 44 24 34          	mov    0x34(%esp),%eax	// eax=p2
 80486e5:	89 44 24 04          	mov    %eax,0x4(%esp)	// (esp+0x4)=p2
 80486e9:	c7 04 24 4f 88 04 08 	movl   $0x804884f,(%esp)
 80486f0:	e8 4b fd ff ff       	call   8048440 <printf@plt>*/
	printf("%s %d %d\n", p2, strlen(p2), 4);

 /*80486f5:	c7 44 24 38 00 00 00 	movl   $0x0,0x38(%esp)
 80486fc:	00 */
	int i = 0;

 /*80486fd:	eb 1f                	jmp    804871e <main+0xee>
 80486ff:	8b 44 24 3c          	mov    0x3c(%esp),%eax	// p1
 8048703:	8d 50 01             	lea    0x1(%eax),%edx	// p1+1
 8048706:	89 54 24 3c          	mov    %edx,0x3c(%esp)	// a=p1
 804870a:	0f b6 00             	movzbl (%eax),%eax		// eax=*p1
 804870d:	8d 4c 24 2f          	lea    0x2f(%esp),%ecx	// ecx=a
 8048711:	8b 54 24 38          	mov    0x38(%esp),%edx	// edx=i
 8048715:	01 ca                	add    %ecx,%edx		// edx=a+i
 8048717:	88 02                	mov    %al,(%edx)		// (a+i)=*p1
 8048719:	83 44 24 38 01       	addl   $0x1,0x38(%esp)	// i+1
 804871e:	83 7c 24 38 02       	cmpl   $0x2,0x38(%esp)	// 2?=i
 8048723:	7e da                	jle    80486ff <main+0xcf>*/
	for (i = 0; i < 3; i++)
		a[i] = *p1++;

 /*8048725:	8d 44 24 2f          	lea    0x2f(%esp),%eax	// a
 8048729:	89 04 24             	mov    %eax,(%esp)		
 804872c:	e8 2f fd ff ff       	call   8048460 <puts@plt>*/
	puts(a);

 /*8048731:	8b 5d fc             	mov    -0x4(%ebp),%ebx
 8048734:	c9                   	leave  
 8048735:	c3                   	ret    
 8048736:	66 90                	xchg   %ax,%ax
 8048738:	66 90                	xchg   %ax,%ax
 804873a:	66 90                	xchg   %ax,%ax
 804873c:	66 90                	xchg   %ax,%ax
 804873e:	66 90                	xchg   %ax,%ax*/
	return 0;
}

